﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IntelliTouchMix
{
    public partial class BlobController
    {
        testForm f;
        
        public BlobController(int n, int nFrames,testForm f)// : base()
        {
            this.f = f;
            blobHistory = new Blobs[n][];
            lastFrameIndex = new int[n];
            currentFrame = new Blobs[n];
            blobsColList = new int[n];
            timeBlobUnfollowed = new int[n];
            // Real time
            blobEventType = new EventType[n]; // the blob is real time or one shot?
            blobTouchMouseEventArgs = new TouchMouseEventArgs[n]; // the event type of the blob
            BlobLastReport = new int[n];
            blobActionType = new ActionType[n];
            blobGestureHandler = new Gesture[n];
            // MAX_TIME_UNFOLLOWED = 100; // 100 ms
            maxBlobs = n;
            nextSpot = 0;
            for (int i = 0; i < n; ++i)
            {
                freeFrame(i);
                currentFrame[i] = new Blobs();
                blobHistory[i] = new Blobs[nFrames];
                for (int j = 0; j < nFrames; ++j)
                    blobHistory[i][j] = new Blobs();
            }
        }
    }
}
